!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[GoogleMap]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[GoogleMap]"]=t(require("react")):e["rb_wixui.thunderbolt[GoogleMap]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(e){function t(t){for(var n,i,l=t[0],c=t[1],s=t[2],p=0,d=[];p{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}const l=i(o.space),c=i(o.enter),s=e=>{c(e),l(e)},u=i(o.escape),p="has-custom-focus",d=(e={})=>{var t,{pressed:r,expanded:o,haspopup:a,label:i,live:l,relevant:c,current:s,owns:u,controls:p,roleDescription:d,hidden:f,disabled:b,describedBy:g,labelledBy:y,errorMessage:v,atomic:m,role:O,busy:h}=e,_=n(e,["pressed","expanded","haspopup","label","live","relevant","current","owns","controls","roleDescription","hidden","disabled","describedBy","labelledBy","errorMessage","atomic","role","busy"]);const j=null!==(t=_.tabIndex)&&void 0!==t?t:_.tabindex,M={};return i&&(M["aria-label"]=i),l&&(M["aria-live"]=l),s&&(M["aria-current"]=s),r&&(M["aria-pressed"]=r),"boolean"==typeof f&&(M["aria-hidden"]=f),"boolean"==typeof o&&(M["aria-expanded"]=o),"boolean"==typeof b&&(M["aria-disabled"]=b),"boolean"==typeof m&&(M["aria-atomic"]=m),"boolean"==typeof h&&(M["aria-busy"]=h),"string"==typeof c&&(M["aria-relevant"]=c),"string"==typeof u&&(M["aria-owns"]=u),"string"==typeof p&&(M["aria-controls"]=p),"string"==typeof d&&(M["aria-roledescription"]=d),a&&(M["aria-haspopup"]=a),"number"==typeof j&&(M.tabIndex=j),O&&(M.role=O),g&&(M["aria-describedby"]=g),y&&(M["aria-labelledby"]=y),v&&(M["aria-errormessage"]=v),M}},1701:function(e,t,r){e.exports=r.p+"54ffcf7fc7c8b914acf6d60cfcec4580.js"},1702:function(e,t,r){e.exports=r.p+"912de467b7889d37daa1a8353a75842d.html"},190:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(8);function a({reducer:e=(()=>({})),iframeLoaded:t}){const r=Object(n.useRef)([]),a=Object(n.useRef)(void 0),i=Object(n.useRef)(void 0),l=Object(n.useRef)(void 0),c=Object(n.useCallback)(e=>{if(a.current&&t){const t=a.current.contentWindow;return void(null==t||t.postMessage(e,"*"))}if(!a.current||!i.current)return void r.current.push(e);const n=a.current.contentWindow;null==n||n.postMessage(e,"*")},[t]),s=Object(n.useCallback)(()=>{0!==r.current.length&&(r.current.forEach(c),r.current=[])},[c]),u=Object(n.useCallback)(t=>{if(l.current&&(l.current(),l.current=void 0),!t)return;const r=()=>{i.current=!0,s(),e({type:"load"},c)};t.addEventListener("load",r),a.current=t,l.current=()=>{t.removeEventListener("load",r)}},[e,c,s]);return Object(n.useEffect)(()=>{t&&s()},[t,s]),Object(n.useEffect)(()=>{if(!Object(o.c)())return;const t=t=>{var r;t.source&&t.source!==(null===(r=a.current)||void 0===r?void 0:r.contentWindow)||e({type:"message",payload:t.data},c)};return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}},[e,c]),[u,c]}},220:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);function o(e,t=null){const r=Object(n.useRef)(t);return Object(n.useEffect)(()=>{r.current=e},[e]),r.current}},2596:function(e,t,r){"use strict";var n=r(0),o=r(6),a=r.n(o),i=r(8),l=r(190),c=r(220);function s(){const e=n.useRef([]);return[n.useCallback(()=>new Promise(t=>e.current.push(t)),[]),n.useCallback(t=>{e.current.forEach(e=>e(t)),e.current.length=0},[])]}const u=(e,t)=>{if(e||t)return t?{path:e,fillColor:t,strokeColor:t,fillOpacity:1,scale:.5}:(e=>{if(e&&e.endsWith(".webp"))try{const t=e.match(/media\/[^/]+/)[0].split(".")[1];e=e.replace(/.webp$/,"."+t)}catch(e){}return e})(e)};var p="load",d="message",f="SET_INITIAL_LOCATIONS",b="SET_CENTER",g="CENTER_UPDATED",y="SET_CENTER_FINISHED",v="SET_ZOOM",m="ZOOM_UPDATED",O="SET_ZOOM_FINISHED",h="MARKER_CLICKED",_="MAP_CLICKED",j="GET_MARKERS",M="MARKERS",E=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o(e=>Object.assign(Object.assign({},e),{locations:e.locations.map(e=>Object.assign(Object.assign({},e),{icon:u(e.pinIcon,e.pinColor)}))}))(t),[t]),L=Object(c.a)(P?T:null),D={[y]:()=>S(),[g]:e=>null==o?void 0:o(e),[O]:()=>C(),[m]:e=>null==r?void 0:r({zoom:e}),[h]:e=>null==a?void 0:a(Object.assign({type:"markerClicked"},e)),[_]:e=>{var{longitude:t,latitude:r}=e,n=E(e,["longitude","latitude"]);return null==i?void 0:i(Object.assign({type:"mapClicked",location:{longitude:t,latitude:r}},n))},[M]:e=>N(e)},I={[p]:({_sendMessage:e})=>{e({type:f,data:JSON.stringify(T)}),R(!0)},[d]:({event:e})=>{var t;if("string"==typeof e.payload){const{type:r,data:n}=JSON.parse(e.payload);null===(t=D[r])||void 0===t||t.call(D,n)}}},[G,U]=Object(l.a)({reducer:(e,t)=>{var r;return null===(r=I[e.type])||void 0===r?void 0:r.call(I,{event:e,_sendMessage:t})}});return Object(n.useImperativeHandle)(e,()=>({setMapCenter:(e,t)=>{const r=w();return U({type:b,data:JSON.stringify({longitude:e,latitude:t})}),r},setMapZoom:e=>{const t=x();return U({type:v,data:e}),t},getVisibleMarkers:()=>{const e=k();return U({type:j}),e}})),Object(n.useEffect)(()=>{if(P){const r=!!L&&(e=T.locations,t=L.locations,e.length===t.length&&e.every((e,r)=>{const n=Object.keys(e);return n.length===Object.keys(t[r]).length&&n.every(n=>e[n]===t[r][n])}));U(JSON.stringify(Object.assign(Object.assign({},T),{shouldKeepMarkers:r})))}var e,t},[T,L,U,P]),[G]}var S=r(672),x=r.n(S);const C={GoogleMapLiftedShadow:()=>n.createElement(n.Fragment,null,n.createElement("div",{className:a()(x.a.left,x.a.shd)}),n.createElement("div",{className:a()(x.a.right,x.a.shd)})),GoogleMapSloppy:()=>n.createElement(n.Fragment,null,n.createElement("div",{className:a()(x.a.brd,x.a.one)}),n.createElement("div",{className:a()(x.a.brd,x.a.two)})),GoogleMapSkin:()=>n.createElement(n.Fragment,null),GoogleMapDefault:()=>n.createElement(n.Fragment,null)};var k=r(1702),N=r.n(k),P=r(1701),R=r.n(P);const T=e=>e.replace("https://static.parastorage.com/services/","https://editor.wix.com/_partials/");t.a=n.forwardRef((e,t)=>{const{id:r,className:o,skin:l,urlQueries:c,mapData:s,translate:u,onUpdateCenter:p,onUpdateZoom:d,onMarkerClicked:f,onMapClicked:b,onMouseEnter:g,onMouseLeave:y,isDesignerMode:v}=e,m=C[l],O=((e,t)=>{const r=t?T(R.a):R.a,n=new URLSearchParams({googleMapsScriptPath:new URL(r).pathname});Object(i.c)()&&n.append("origin",window.origin);return`${t?T(N.a):N.a}?${e}&${n}`})(c,v),[h,_]=n.useState(!1),[j]=w(t,s,{onUpdateCenter:p,onUpdateZoom:d,onMarkerClicked:f,onMapClicked:b});n.useEffect(()=>{_(!0)},[O]);const M=u("component_label","COMPONENT_LABEL_googleMapsTitle","Google Map");return n.createElement("div",Object.assign({id:r},Object(i.b)(e),{tabIndex:0,className:a()(o,x.a[l],x.a.wixIframe)}),h&&n.createElement("wix-iframe",{title:M,"aria-label":M,"data-src":O},n.createElement(m,null),n.createElement("div",{id:"mapContainer_"+r,onMouseEnter:g,onMouseLeave:y,className:x.a.mapContainer},n.createElement("iframe",{ref:j,title:M,"aria-label":M,"data-src":O,width:"100%",height:"100%",frameBorder:"0",scrolling:"no",allowFullScreen:!0}))))})},4624:function(e,t,r){"use strict";r.r(t),r.d(t,"components",(function(){return n})),r.d(t,"version",(function(){return o}));const n={GoogleMap:{component:r(2596).a}},o="1.0.0"},6:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t